home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7646 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: memory allocation using malloc and free
  5. Date: Tue, 27 Feb 96 21:33:24 GMT
  6. Organization: none
  7. Message-ID: <825456804snz@genesis.demon.co.uk>
  8. References: <4gagll$5rc@bertrand.ccs.carleton.ca> <danpop.824767980@rscernix> <4gbqd7$1em@inet-nntp-gw-1.us.oracle.com> <4gd8ngINNp5i@keats.ugrad.cs.ubc.ca> <danpop.824952492@rscernix>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <danpop.824952492@rscernix> danpop@mail.cern.ch "Dan Pop" writes:
  15.  
  16. >For this particular discussion, the limit is 32K - 1.  And no more than
  17. >one object of this size.  (Actually the phrasing is a little bit silly,
  18. >because it doesn't even guarantee that every program containing such an
  19. >object can be compiled and run, it requires that at least one program 
  20. >should be correctly translated):
  21.  
  22. The wording may not guarantee much but it is not silly. All real systems
  23. have memory limit on a running program. If the wording guaranteed that
  24. every program containing such an object (and in the absense of other
  25. violations) can be compiled and run I can show all implementations to be
  26. non-conforming. All I have to do is write a program that allocates x lots
  27. of, say, 10K blocks and then a 32K-1 block. For any system with limited
  28. memory there will be a value of x at which this fails. I may have to perform
  29. a lot of trial and error to find x and the value may vary from run to run
  30. but sooner or later I will hit a run that fails.
  31.  
  32. -- 
  33. -----------------------------------------
  34. Lawrence Kirby | fred@genesis.demon.co.uk
  35. Wilts, England | 70734.126@compuserve.com
  36. -----------------------------------------
  37.